package com.qfedu.tantu.controller;

import com.qfedu.tantu.service.intf.ArticleService;
import com.qfedu.tantu.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api/article")
@Api(tags = "展现文章的相关操作")
@CrossOrigin
public class ArticleController {
    @Autowired
    private ArticleService service;
    @ApiOperation(value = "查询文章")
    @GetMapping("/list.do")
    public R query(int id){
        return service.query(id);
    }
    @GetMapping("/indexselect.do")
    public R indexSelect(){
        return service.indexQuery();
    }
}
